package org.shiwen.week9.answer.q1;

public class Fish extends  Animal{
    private double weight;

    public Fish(int age, double weight) {
        super(age);
        this.weight = weight;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    @Override
    public void info() {
        System.out.println("我是一只" + weight + "斤重的鱼");
        System.out.println("我今年" + getAge() + "岁了!");
    }
}
